Skip to content

[CI] PR 자동 라벨링 및 리마인더 워크플로우 추가#1

Merged
CHOOSLA merged 1 commit into
mainfrom
feature/add-ci-workflows
Oct 12, 2025
Merged

[CI] PR 자동 라벨링 및 리마인더 워크플로우 추가#1
CHOOSLA merged 1 commit into
mainfrom
feature/add-ci-workflows

Conversation

@CHOOSLA
Copy link
Copy Markdown
Member

@CHOOSLA CHOOSLA commented Oct 12, 2025

중앙 관리되는 Reusable Workflow를 사용하여 PR 자동 라벨링 및 리마인더 기능을 추가합니다.

Summary by CodeRabbit

  • Chores
    • PR 리뷰 승인/취소 이벤트에 따라 자동으로 라벨을 업데이트하는 워크플로우를 추가했습니다.
    • 하루에 세 차례(09:00, 14:00, 17:00 UTC) 미처리 PR을 알리는 스케줄 리마인더 워크플로우를 도입했습니다.
    • 리마인더는 수동 실행도 지원하여 필요 시 즉시 알림을 보낼 수 있습니다.
    • 관련 워크플로우는 필요한 권한과 비밀정보 전달을 안전하게 처리하도록 설정되었습니다.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Oct 12, 2025

Walkthrough

두 개의 GitHub Actions 워크플로우가 추가되었으며, 하나는 PR 리뷰(submitted/dismissed) 기반 라벨링을 재사용 워크플로우로 호출하고, 다른 하나는 하루 3회(09:00,14:00,17:00 UTC) 스케줄 및 수동 실행 가능한 PR 리마인더를 재사용 워크플로우로 호출하도록 구성했다. 권한과 시크릿 전달이 명시되었다.

Changes

Cohort / File(s) Summary
PR 승인 수 라벨링 워크플로우
.github/workflows/labeler.yml
pull_request_review 이벤트( submitted, dismissed )로 트리거. 권한: pull-requests: write, contents: read. 재사용 워크플로우 33Auto/.github/.github/workflows/reusable-label-on-approve.yml@main 호출, secrets: inherit.
PR 리마인더 워크플로우
.github/workflows/pr-reminder.yml
스케줄 트리거(cron: 0 9,14,17 * * *) 및 workflow_dispatch 수동 트리거 추가. 재사용 워크플로우 33-Auto/.github/.github/workflows/reusable-pr-reminder.yml@main 호출. SLACK_WEBHOOK_URL 시크릿을 전달하고 secrets 상속 사용.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Reviewer
  participant GH as GitHub Actions
  participant ReusableLabel as reusable-label-on-approve

  Reviewer->>GH: pull_request_review submitted/dismissed
  activate GH
  GH->>ReusableLabel: Call reusable workflow (permissions set, secrets inherited)
  activate ReusableLabel
  ReusableLabel-->>GH: Update/apply labels
  deactivate ReusableLabel
  deactivate GH
Loading
sequenceDiagram
  autonumber
  participant Cron as Scheduler (09:00,14:00,17:00 UTC)
  participant GH as GitHub Actions
  participant ReusableReminder as reusable-pr-reminder
  participant Slack as Slack Webhook

  Cron-->>GH: Scheduled trigger
  GH->>ReusableReminder: Call reusable workflow (pass SLACK_WEBHOOK_URL, inherit secrets)
  activate ReusableReminder
  ReusableReminder->>Slack: Post PR reminders
  deactivate ReusableReminder
  Note over GH,ReusableReminder: Manual run via workflow_dispatch 가능
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

작은 발로 툭툭, 라벨 달아주는 토깽이 🐇
오전·오후·저녁 세 번, 리마인더 종이 울려요 ⏰
시크릿 하나 챙겨 슬랙으로 폴짝 날아가면
승인 수만큼 토픽 콕콕, 깔끔히 정리됐네 ✨
당근은 개발자 몫, 토깽이는 축하 춤을 춰요 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed 제목은 PR의 핵심 변경 사항인 PR 자동 라벨링 및 리마인더 워크플로우 추가를 명확하고 간결하게 요약하고 있어 스캔하는 동료도 쉽게 이해할 수 있습니다.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/add-ci-workflows

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d617efc and 670fc5a.

📒 Files selected for processing (2)
  • .github/workflows/labeler.yml (1 hunks)
  • .github/workflows/pr-reminder.yml (1 hunks)
🔇 Additional comments (1)
.github/workflows/labeler.yml (1)

7-13: 구성이 깔끔합니다.

재사용 워크플로 호출과 필요한 권한 설정이 모두 잘 맞춰졌습니다.

Comment thread .github/workflows/pr-reminder.yml Outdated
@CHOOSLA CHOOSLA force-pushed the feature/add-ci-workflows branch from 670fc5a to 2308b77 Compare October 12, 2025 16:14
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/labeler.yml (1)

16-18: 시크릿 전달 OK, 스코프 최소화 확인 필요.

ORGANIZATION_TOKEN 존재/권한(예: private repo 라벨 변경에 필요한 repo 권한) 확인 바랍니다. 포크 PR에도 적용하려면 시크릿 미전달 제약을 고려해야 합니다.

  • 내부 PR만 대상이면 현 구성 유지.
  • 포크 PR까지 커버하려면 대안(예: 다른 트리거/아키텍처) 검토 필요.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 670fc5a and 2308b77.

📒 Files selected for processing (2)
  • .github/workflows/labeler.yml (1 hunks)
  • .github/workflows/pr-reminder.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/pr-reminder.yml
🔇 Additional comments (2)
.github/workflows/labeler.yml (2)

8-10: 재사용 워크플로우 경로 확인 권장.

리포지토리명이 .github인 중앙 리포를 가리킬 때 .github/.github/workflows/... 경로가 맞습니다. 해당 파일이 main 브랜치에 존재하는지 확인만 부탁드립니다.


11-15: pr-number 입력 전달 방식 적절.

pull_request_review 이벤트 컨텍스트에서 github.event.pull_request.number 사용은 유효합니다.

재사용 워크플로우의 입력 스키마가 pr-number를 기대하는지 확인해 주세요(이름 불일치 시 실패).

Comment on lines +3 to +7
on:
pull_request_review:
types: [submitted, dismissed]

jobs:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

GITHUB_TOKEN 권한 미지정 → 라벨 추가 실패 위험(403).

pull-requests: write 이 없으면 재사용 워크플로우에서 라벨 추가가 막힐 수 있습니다. 최소 권한을 명시하세요.

적용 제안:

 on:
   pull_request_review:
     types: [submitted, dismissed]

+permissions:
+  contents: read
+  pull-requests: write
🤖 Prompt for AI Agents
In .github/workflows/labeler.yml around lines 3 to 7, the workflow does not
declare GITHUB_TOKEN permissions which can cause 403 when adding labels; add a
top-level permissions entry granting at minimum pull-requests: write (or the
specific write permission the label action requires) so the reused workflow can
add labels successfully, e.g., include a permissions block with pull-requests:
write (and any additional minimal write perms required by the label action).

@CHOOSLA CHOOSLA merged commit e4bd2e0 into main Oct 12, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant